<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>《系统工程》精品资源共享课——教师课程管理</title>
	<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="../css/common.css">
	<link rel="stylesheet" type="text/css" href="../../css/bootstrap-table.css">
	<style type="text/css">
		main{
			background-color: white;
			width:90%;
			margin:30px auto 170px;
			padding-bottom:100px;
		}
		main .content{
			width:90%;
			margin:0 auto;
		}

		#videoTab .btn-groups , #homeworkTab .btn-groups {
			margin-top:20px;
			margin-bottom:-45px;
		}
		#mp4file,#docfile{
			width:50%;
			display: inline-block;
		}
	</style>
</head>
<body>
	<div id="top">
		<img src="../image/huanonglogo.png" class="logo">
		<ul>
			<li class="userInfo hidden"><a href="userInformation.html">个人信息</a></li>
			<li><span id="user"></span></li>
			<li class="logout hidden"><a href="login.html">退出</a></li>
			<li id="login" class="login"><a href="login.html"><img src="../image/user.png"><span>登录</span></a></li>
		</ul>
	</div>
	<nav>
		<ul class="rows">
			<li class="col-md-2 col-lg-2"><a href="../index.html">首页</a></li>
			<li class="dropdown col-md-2 col-lg-2">
				<a href="#"  data-toggle="dropdown" class="dropdown-toggle">课程概要<span class="glyphicon glyphicon-chevron-down"></span></a>
				<ul class="dropdown-menu">
					<li><a href="primaryResource.html">教学大纲</a></li>
					<li><a href="primaryResource.html">教学日历</a></li>
					<li><a href="primaryResource.html">教学教材</a></li>
					<li><a href="primaryResource.html">参考资料</a></li>
					<li><a href="primaryResource.html">重点难点</a></li>
				</ul>
			</li>
			<li class="dropdown col-md-2 col-lg-2">
				<a href="#"  data-toggle="dropdown" class="dropdown-toggle">课程资源<span class="glyphicon glyphicon-chevron-down"></span></a>
				<ul class="dropdown-menu">
					<li><a href="video.html">教学视频</a></li>
					<li><a href="ppt.html">教学课件</a></li>
					<li><a href="homework.html">作业</a></li>
				</ul>
			</li>
			<li class="col-md-2 col-lg-2"><a href="courses.html">课程内容</a></li>
			<li class="col-md-2 col-lg-2"><a href="expandingResource.html">拓展资源</a></li>
			<li class="col-md-2 col-lg-2"><a href="teacherCourseManagement.html">课程管理</a></li>
		</ul>

	</nav>
	<main>
		<div class="content">
			<div id="sectionTab">
				<table id="section_grid"></table>
			</div>
			<div id="videoTab">
				<div class="btn-groups hidden">
					<button type="button" class="btn btn-primary" onclick="addResource('video')" data-toggle="modal" data-target="#fileModal">新增</button>
					<button type="button" class="btn btn-warning" onclick="delResource('video')">删除</button>
					<h3 class="seName"></h3>
					<span class="seId hidden"></span>
				</div>
				<table id="video_grid"></table>
			</div>
			<div id="homeworkTab">
				<div class="btn-groups hidden">
					<button type="button" class="btn btn-primary" onclick="addResource('homework')" data-toggle="modal" data-target="#fileModal">新增</button>
					<button type="button" class="btn btn-warning" onclick="delResource('homework')">删除</button>
					<h3 class="seName"></h3>
					<span class="seId hidden"></span>
				</div>
				<table id="homework_grid"></table>
			</div>
		
		</div>
	</main>
	<!-- 视频作业 模态框 -->
	<div class="modal fade" id="fileModal" tabindex="-1" role="dialog" aria-labelledby="fileModalLabel" aria-hidden="true" data-backdrop="static">
	    <div class="modal-dialog">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true" onclick="resetForm()">&times;</button>
	                <h4 class="modal-title" id="fileModalLabel"></h4>
	            </div>
	            <div class="modal-body">
	            	<form role="form" name="adminForm" enctype="multipart/form-data">
	            		<input type="text" name="id" class="form-control hidden">
						<input type="text" name="seId" class="form-control hidden">
						<input type="text" name="type" class="form-control hidden" />
						<div class="form-group hidden">
							<label for="file">当前文件  <span style="color:red">(如需更改请在下面文件中添加)</span></label>
							<input type="text" name="current" class="form-control required " disabled="true"/>
						</div>
						<div class="form-group hidden">
							<label for="file">视频文件</label>
							<input type="file" id="mp4file" name="mp4file" class="form-control required " accept="video/mp4"/>
							<button type="button" class="btn btn-primary btn-sm" onclick="upLoadFile('video')">上传</button>
						</div>
						<div class="form-group hidden">
							<label for="file">作业文件</label>
							<input type="file" id="docfile" name="docfile" class="form-control required " accept="application/msword"/>
							<button type="button" class="btn btn-primary btn-sm" onclick="upLoadFile('homework')">上传</button>
						</div>
						<div class="form-group hidden">
							<label for="vSeq">视频顺序</label>
							<input type="number" name="vSeq" min="1" class="form-control required "/>
						</div>
	            	</form>
	            </div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="resetForm()">关闭</button>
	                <button type="button" class="btn btn-primary btn-submit hidden addSubmit" onclick="addResourceSubmit()">提交更改</button>
	                <button type="button" class="btn btn-primary btn-submit hidden editSubmit" onclick="editResourceSubmit()">提交更改</button>
	            </div>
	        </div><!-- /.modal-content -->
	    </div><!-- /.modal -->
	</div>
	<div class="modal fade" id="sectionModal" tabindex="-1" role="dialog" aria-labelledby="sectionModalLabel" aria-hidden="true" data-backdrop="static">
	    <div class="modal-dialog">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true" onclick="resetForm()">&times;</button>
	                <h4 class="modal-title" id="sectionModalLabel">修改章节内容</h4>
	            </div>
	            <div class="modal-body">
	            	<form role="form" name="adminForm" enctype="multipart/form-data">
	            		<input type="text" name="seId" class="form-control hidden">
						<div class="form-group">
							<label for="seName">章节名称</label>
							<input type="text" name="seName" class="form-control required " />
						</div>
						<div class="form-group">
							<label for="seSeq">章节顺序</label>
							<input type="number" name="seSeq" class="form-control required " />
						</div>
						<div class="form-group">
							<label for="tId">上课老师</label>
							<select type="text" name="tId" class="form-control required "></select>
						</div>
						<div class="form-group">
							<label for="file">当前PPT  <span style="color:red">(如需更改请在下面文件中添加)</span></label>
							<input type="text" name="sePpt" class="form-control required " disabled="true" />
						</div>
						<div class="form-group">
							<label for="file">PPT</label>
							<input type="file" name="pptfile" class="form-control required " accept="application/vnd.ms-powerpoint" id="filePPT"/>
						</div>
	            	</form>
	            </div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="resetForm()">关闭</button>
	                <button type="button" class="btn btn-primary btn-submit">提交更改</button>
	            </div>
	        </div><!-- /.modal-content -->
	    </div><!-- /.modal -->
	</div>
	<footer>
		<p>版权所有：华南农业大学 数学与信息学院 软件学院</p>
	</footer>
	<script type="text/javascript" src="../js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js"></script>
	<script type="text/javascript" src="../../js/bootstrap-table.js"></script>
	<script type="text/javascript" src="../../js/bootstrap-table-zh-CN.js"></script>
	<script type="text/javascript" src="../js/common.js"></script>
	<script type="text/javascript" src="../js/section.js"></script>
	<script type="text/javascript">


	</script>
</body>
</html>